package com.yanu.t2s.service.Impl;

import com.yanu.t2s.entity.Pig;
import com.yanu.t2s.mapper.PigMapper;
import com.yanu.t2s.service.PigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PigServiceImpl implements PigService {
    @Autowired
    PigMapper pigMapper;


    @Override
    public List<Pig> findByIDyangzhi(int iduser) {
        return pigMapper.findByIDyangzhi(iduser);
    }

    @Override
    public List<Pig> findBYIDtuzai(int iduser) {
        return findBYIDtuzai(iduser);
    }

    @Override
    public List<Pig> findAllPig() {
        return pigMapper.findAllPig();
    }

    @Override
    public void insertpig(Pig pig) {
        pigMapper.insertpig(pig);
    }

    @Override
    public List<Pig> findPigsofoneyangzhi(int yangzhiid) {
        return pigMapper.findPigsofoneyangzhi(yangzhiid);
    }

    @Override
    public void buyonepig1(int pigid, int userid, double weight) {
        pigMapper.buyonepig1(pigid,userid,weight);
    }

    @Override
    public void buyonepig2(int pigid, int userid, double weight) {
        pigMapper.buyonepig2(pigid,userid,weight);
    }



}
